<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('竞彩比分结果列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>竞彩编号：</label>
                                <input type="text" name="jcNumber"/>
                            </li>
                            <li>
                                <label>主场球队id：</label>
                                <input type="text" name="homeId"/>
                            </li>
                            <li>
                                <label>主场球队名称：</label>
                                <input type="text" name="homeTeam"/>
                            </li>
                            <li>
                                <label>客场球队id：</label>
                                <input type="text" name="opponentId"/>
                            </li>
                            <li>
                                <label>客场球队名称：</label>
                                <input type="text" name="opponentTeam"/>
                            </li>
                            <li>
                                <label>主场分数：</label>
                                <input type="text" name="homeScore"/>
                            </li>
                            <li>
                                <label>客场分数：</label>
                                <input type="text" name="opponentScore"/>
                            </li>
                            <li>
                                <label>比赛日期：</label>
                                <input type="text" class="time-input" placeholder="请选择比赛日期" name="raceDate"/>
                            </li>
                            <li>
                                <label>胜负是否赢盘 1是 0否：</label>
                                <input type="text" name="outcomeResult"/>
                            </li>
                            <li>
                                <label>大小最终基准分数：</label>
                                <input type="text" name="referenceFinalScore"/>
                            </li>
                            <li>
                                <label>大小分是否赢盘 1是 0否：</label>
                                <input type="text" name="referenceScoreResult"/>
                            </li>
                            <li>
                                <label>让分最终基准分数：</label>
                                <input type="text" name="asFinalScore"/>
                            </li>
                            <li>
                                <label>让分是否赢盘 1是 0否：</label>
                                <input type="text" name="asScoreResult"/>
                            </li>
                            <li>
                                <label>是否有效 1有效 0无效：</label>
                                <input type="text" name="yn"/>
                            </li>
                            <li>
                                <label>创建人：</label>
                                <input type="text" name="creator"/>
                            </li>
                            <li>
                                <label>创建时间：</label>
                                <input type="text" class="time-input" placeholder="请选择创建时间" name="ts"/>
                            </li>
                            <li>
                                <label>更新人：</label>
                                <input type="text" name="modifier"/>
                            </li>
                            <li>
                                <label>更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择更新时间" name="modifyTime"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:result:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:result:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:result:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:result:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:result:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:result:remove')}]];
        var prefix = ctx + "system/result";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "竞彩比分结果",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'jcNumber',
                    title: '竞彩编号'
                },
                {
                    field: 'homeId',
                    title: '主场球队id'
                },
                {
                    field: 'homeTeam',
                    title: '主场球队名称'
                },
                {
                    field: 'opponentId',
                    title: '客场球队id'
                },
                {
                    field: 'opponentTeam',
                    title: '客场球队名称'
                },
                {
                    field: 'homeScore',
                    title: '主场分数'
                },
                {
                    field: 'opponentScore',
                    title: '客场分数'
                },
                {
                    field: 'raceDate',
                    title: '比赛日期'
                },
                {
                    field: 'outcomeResult',
                    title: '胜负是否赢盘 1是 0否'
                },
                {
                    field: 'referenceFinalScore',
                    title: '大小最终基准分数'
                },
                {
                    field: 'referenceScoreResult',
                    title: '大小分是否赢盘 1是 0否'
                },
                {
                    field: 'asFinalScore',
                    title: '让分最终基准分数'
                },
                {
                    field: 'asScoreResult',
                    title: '让分是否赢盘 1是 0否'
                },
                {
                    field: 'type',
                    title: '类型1NBA 2英超 3西甲 4意甲 5德甲 6法甲 7中超 8J联赛 9WNBA'
                },
                {
                    field: 'yn',
                    title: '是否有效 1有效 0无效'
                },
                {
                    field: 'creator',
                    title: '创建人'
                },
                {
                    field: 'ts',
                    title: '创建时间'
                },
                {
                    field: 'modifier',
                    title: '更新人'
                },
                {
                    field: 'modifyTime',
                    title: '更新时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>